cmake_minimum_required(VERSION 3.9)
project(wbServer)

unset(source_files)

set(CMAKE_CXX_STANDARD 11)

set(CMAKE_BUILD_TYPE "release")

SET(CMAKE_CXX_FLAGS_RELEASE "$ENV{CXXFLAGS} -O3 -Wall -fpermissive")

ADD_DEFINITIONS(-DJSON_IS_AMALGAMATION)

set(srcdirs
        .)

include_directories(
		include/
        .
)

find_library(
            ${CMAKE_SOURCE_DIR}/lib/webSocket/
            .
    )

link_directories(
            ${CMAKE_SOURCE_DIR}/lib/webSocket/
    )

foreach(srcdir ${srcdirs})
    aux_source_directory(${srcdir} source_files)
endforeach()
#target_link_libraries(isesol)

add_executable(wbServer ${source_files})
target_link_libraries(wbServer libwebsockets.so)